/*
	Alfred.cpp
*/

#include "Alfred.h"

void Alfred::move()
{
	switch(diff)
	{
		case EASY:
			game->move(random_move());
			return;

		case MEDIUM:
		case HARD:
		default:
			cerr << "Difficulties not implemented";
			return;
	}
}

const Move Alfred::random_move()
{
	int i = rand() % 15 + 1;
	int j = rand() % 15 + 1;

	while(!game->validate_move(i, j))
	{
		i = rand() % 15 + 1;
		j = rand() % 15 + 1;
	}

	Move m(i, j, piece);

	return m;
}
